package com.condition;

/**
 * @author Zhang Guangyong
 * @desacription 取钱线程
 * @date 2019年08月19日 9:28
 */
public class DrawThread extends Thread {

    private Account account;

    private double drawAmount;

    public DrawThread(String name, Account account, double drawAmount) {
        super(name);
        this.account = account;
        this.drawAmount = drawAmount;
    }

    public void run() {
        for (int i = 0; i < 100; i++) {
            account.draw(drawAmount);
        }
    }

}
